package com.novel.controller;

import com.novel.service.ReplySerive;
import com.reading.pojo.Reply;
import com.reading.vo.Rmed;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("reply")
public class ReplyController {
    @Resource
    private ReplySerive replySerive;

    @RequestMapping("findall")
    public Rmed findall(Integer pid){
        return Rmed.suceessData(replySerive.findall(pid));
    }

    @RequestMapping("add")
    public Rmed add(@RequestBody Reply reply){
        return Rmed.suceessData(replySerive.add(reply));
    }
}
